package com.hx.voice.recognition.admin;

import com.ace.cache.EnableAceCache;
import com.hx.voice.recognition.admin.datasource.DynamicDataSourceConfig;
import com.hx.voice.recognition.auth.client.EnableCrmAuthClient;
import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @descripe：用户启动主类
 * @company：南京华讯方舟通讯设备有限公司
 * @author：zhoujinbing
 * @time：2019/5/20 14:31
 * @version：V1.0
 */
//导入自定义动态数据源,移除自带装配数据源
@Import(value = DynamicDataSourceConfig.class)
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableDiscoveryClient
@MapperScan("com.hx.voice.recognition.admin.*.mapper")
@EnableCircuitBreaker
@EnableFeignClients({"com.hx.voice.recognition.auth.client.feign"})
@EnableScheduling
@EnableCrmAuthClient
@EnableAceCache
@EnableTransactionManagement
@EnableSwagger2Doc
public class AdminApplication {

    public static void main(String[] args) {
        SpringApplication.run(AdminApplication.class,args);
    }
}